import request from "@/utils/request";
export function listAllPackage() {
  return request({
    url: "/vipPackage/list",
    method: "get",
  });
}
// 分页查询套餐列表
export function listPackageByPage(query) {
  return request({
    url: '/vipPackage/page',
    method: 'get',
    params: query
  })
}
// 删除套餐
export function delPackage(packageId) {
  return request({
    url: '/vipPackage/' + packageId,
    method: 'delete'
  })
}
// 查询套餐详细
export function getPackage(packageId) {
  return request({
    url: '/vipPackage/' + packageId,
    method: 'get'
  })
}

// 新增套餐
export function addPackage(data) {
  return request({
    url: '/vipPackage',
    method: 'post',
    data: data
  })
}

// 修改套餐
export function updatePackage(data) {
  return request({
    url: '/vipPackage',
    method: 'put',
    data: data
  })
}